/*
 * Copyright (c) 2018.
 * http://www.ulabcare.com
 */

package com.mt.roll.upms.params;

import com.mt.roll.core.base.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 找回密码请求参数对象
 *
 * @author jiff
 * @date 2018/11/14
 * @since 1.0
 */
@EqualsAndHashCode(callSuper = false)
@Data
@Builder
@ApiModel(value = "找回密码请求参数对象", description = "用于找回用户自己的密码")
public class FindPasswordParam extends BaseParam {

    @ApiModelProperty(value = "手机号码", required = true, example = "13588441519")
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号码格式不正确")
    private String mobile;
    /**
     * 短信验证码
     */
    @ApiModelProperty(value = "短信验证码", required = true, example = "123456", position = 1)
    @NotBlank(message = "短信验证码不能为空")
    private String smsCode;
    /**
     * 密码
     */
    @ApiModelProperty(value = "密码", required = true, example = "123456", position = 1)
    @Length(min = 6, max = 20, message = "密码长度为6-20位")
    private String password;


}
